﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Micronet.OpenWeb.Common;
using Micronet.OpenWeb.Utils;

namespace Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenPersonality
{
    public partial class TwelveYearCycleOfAnimalEdit : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if ("ID".OwQsIsExist())
            {
                TwelveYearCycleOfAnimalDv.DefaultMode = DetailsViewMode.Edit;
            }
            else
            {
                TwelveYearCycleOfAnimalDv.DefaultMode = DetailsViewMode.Insert;

            }

            TwelveYearCycleOfAnimalOds.Inserted +=
                new ObjectDataSourceStatusEventHandler(TwelveYearCycleOfAnimalOds_Inserted);
            TwelveYearCycleOfAnimalOds.Updated +=
                new ObjectDataSourceStatusEventHandler(TwelveYearCycleOfAnimalOds_Updated);
            TwelveYearCycleOfAnimalOds.Deleted +=
                new ObjectDataSourceStatusEventHandler(TwelveYearCycleOfAnimalOds_Deleted);


        }

        void  TwelveYearCycleOfAnimalOds_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
        {
            Response.Redirect("TwelveYearCycleOfAdmin.aspx");
        }
    
        void TwelveYearCycleOfAnimalOds_Updated(object sender, ObjectDataSourceStatusEventArgs e)
        {
            Response.Redirect("TwelveYearCycleOfAdmin.aspx");
        }

        void TwelveYearCycleOfAnimalOds_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
        {
            Response.Redirect("TwelveYearCycleOfAdmin.aspx");
        }
    }
}